package common

// Config holds the configuration for the application.
type Config struct {
	Server struct {
		Port int    `mapstructure:"port"`
		Host string `mapstructure:"host"`
	} `mapstructure:"server"`
	SQL struct {
		Local DBConfig `mapstructure:"local"`
		Dev   DBConfig `mapstructure:"dev"`
	} `mapstructure:"sql"`
	Mode string `mapstructure:"mode"`

	Grpc struct {
		GpuMetric struct {
			EndPoint string `mapstructure:"endpoint"`
		} `mapstructure:"gpu_metric"`
	} `mapstructure:"grpc"`
}
type DBConfig struct {
	Datasource struct {
		URL string `mapstructure:"url"`
	} `mapstructure:"datasource"`
}

// BootStrapConfig holds the bootstrap configuration for the application.
type BootStrapConfig struct {
	Nacos struct {
		Client struct {
			NamespaceId string `mapstructure:"namespace-id"`
		} `mapstructure:"client"`
		Server []struct {
			Addr   string `mapstructure:"addr"`
			Port   uint64 `mapstructure:"port"`
			Scheme string `mapstructure:"scheme"`
		} `mapstructure:"server"`
	} `mapstructure:"nacos"`

	GRPC GRPCEndpointConfig `mapstructure:"grpc"`
}

// GRPCEndpointConfig holds the gRPC endpoint configuration.
type GRPCEndpointConfig struct {
	GPUMetric struct {
		Endpoint string `mapstructure:"endpoint"`
	} `mapstructure:"gpu_metric"`
}
